﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.Infrastructure;
using DLM.Domain.Model;


namespace DLM.Data.EF.CodeFirst.Mapping
{
    public class LogMap:EntityTypeConfiguration<Log>
    {
        public LogMap()
        {
            this.HasKey(t => t.LogID);
            this.ToTable("Log");
            this.Property(t => t.LogID).HasColumnName("Id");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Level).HasColumnName("Level").IsUnicode(false).HasMaxLength(50);
            this.Property(t => t.Logger).HasColumnName("Logger").IsUnicode(false).HasMaxLength(255);
            this.Property(t => t.ThreadInfo).HasColumnName("Thread").HasMaxLength(255);
            this.Property(t => t.Message).HasColumnName("Message").HasMaxLength(4000);
            this.Property(t => t.ExceptionInfo).HasColumnName("Exception").HasMaxLength(2000);
        }
    }
}
